<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      .father {
        display: flex;
        width: 100vw;
        height: 300px;
        overflow: hidden;
      }
      .son1 {
        width: 100px;
        background-color: aqua;
      }
      .son2 {
        flex-grow: 1;
        background-color: rgb(25, 7, 163);
      }
    </style>
  </head>
  <body>
    <div class="father">
      <div class="son1"></div>
      <div class="son2"></div>
    </div>

    <script>
      // 延迟3秒执行后面的代码
      function delay(ms) {
        return new Promise((resolve) => setTimeout(resolve, ms));
      }

      async function PrintNumber() {
        console.log(1);
        await delay(3000);
        console.log(2);
      }

      PrintNumber();

      function a() {
        var a = 10;
        // a++;
        // console.log(a);
        return function () {
          a++;
          console.log(a);
        };
      }
      // const ad = a();
      // ad();
      // ad();
      // ad();
    </script>
  </body>
</html>
